package com.garlicts.excel;

import java.util.Objects;

import org.apache.poi.hssf.usermodel.HSSFClientAnchor;
import org.apache.poi.ss.usermodel.ClientAnchor;
import org.apache.poi.xssf.usermodel.XSSFClientAnchor;

public class ClientAnchorFactory {
	
	public ClientAnchorFactory() {
	}
	
	public ClientAnchor getClientAnchor(ExcelEnum excelEnum) {
		
		if(Objects.equals(ExcelEnum.EXCEL_2003.getCode(), excelEnum.getCode())) {
			return new HSSFClientAnchor(0, 0, 0, 0, (short)3, 3, (short)5, 6);
		}
		else if(Objects.equals(ExcelEnum.EXCEL_2007.getCode(), excelEnum.getCode())) {
			return new XSSFClientAnchor(0, 0, 0, 0, (short)3, 3, (short)5, 6);
		}
		
		return null;
		
	}
	
}
